package com.devunion.salon.persistence;

import javax.persistence.*;

/**
 CREATE TABLE `employee` (
   `id` int(11) NOT NULL auto_increment,
   `fname` varchar(50) default NULL,
   `lname` varchar(50) NOT NULL,
   `login_id` int(11) default NULL,
   `schedule` varchar(7) NOT NULL default '0000000',
   `commission` decimal(10,3) default NULL,
   `location_id` int(11) NOT NULL default '1',
   PRIMARY KEY  (`id`)
 ) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=5 ;
 *
 * @author Viktar Liaskovich
 */

@Entity
@Table(name = "employee")
public class Employee extends BasePersistentObject {

    @Column(name = "firstName", length = 50, nullable = true)
    private String firstName;

    @Column(name = "lastName", length = 50, nullable = true)
    private String lastName;        

    @Column(name = "commission", nullable = true)
    private Float commission;

    @ManyToOne(cascade = {CascadeType.REMOVE})
    private Location location;

    @Column(name = "monday", nullable = false)
    private Boolean monday = Boolean.FALSE;

    @Column(name = "tuesday", nullable = false )
    private Boolean tuesday = Boolean.FALSE;

    @Column(name = "wednesday", nullable = false )
    private Boolean wednesday = Boolean.FALSE;

    @Column(name = "thrusday", nullable = false )
    private Boolean thrusday = Boolean.FALSE;

    @Column(name = "friday", nullable = false )
    private Boolean friday = Boolean.FALSE;

    @Column(name = "saturday", nullable = false )
    private Boolean saturday = Boolean.FALSE;

    @Column(name = "sunday", nullable = false)
    private Boolean sunday = Boolean.FALSE;

    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public Float getCommission() {
        return commission;
    }

    public void setCommission(Float commission) {
        this.commission = commission;
    }

    public Location getLocation() {
        return location;
    }

    public void setLocation(Location location) {
        this.location = location;
    }

    public Boolean getMonday() {
        return monday;
    }

    public void setMonday(Boolean monday) {
        this.monday = monday;
    }

    public Boolean getTuesday() {
        return tuesday;
    }

    public void setTuesday(Boolean tuesday) {
        this.tuesday = tuesday;
    }

    public Boolean getWednesday() {
        return wednesday;
    }

    public void setWednesday(Boolean wednesday) {
        this.wednesday = wednesday;
    }

    public Boolean getThrusday() {
        return thrusday;
    }

    public void setThrusday(Boolean thrusday) {
        this.thrusday = thrusday;
    }

    public Boolean getFriday() {
        return friday;
    }

    public void setFriday(Boolean friday) {
        this.friday = friday;
    }

    public Boolean getSaturday() {
        return saturday;
    }

    public void setSaturday(Boolean saturday) {
        this.saturday = saturday;
    }

    public Boolean getSunday() {
        return sunday;
    }

    public void setSunday(Boolean sunday) {
        this.sunday = sunday;
    }
}
